<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>话题审核</title>

  {include file='common/_require'/}
</head>

<body>

  {include file='common/_header'/}

  <div class="layui-container fly-marginTop fly-user-main">
    {include file='common/_user'/}
    <script>$('.user-nav-item-topic-status').addClass('layui-this')</script>


    <div class="fly-panel fly-panel-user" pad20>
      <div class="layui-tab layui-tab-brief" lay-filter="user">
        <ul class="layui-tab-title status-manage">
          <li class="status-manage-0" data-href="{:url('statusManage',['status'=>0])}">在线</li>
          <li class="status-manage-1" data-href="{:url('statusManage',['status'=>1])}">下架</li>
          
        </ul>
        <script>$('.status-manage-{$Request.param.status|default="0"}').addClass('layui-this')</script>
        <div class="layui-tab-content" style="padding: 20px 0;">
          <div class="layui-form layui-form-pane layui-tab-item layui-show">

            <table class="layui-table">
              <thead>
                <tr>
                  <th>话题ID</th>
                  <th>标题</th>
                  <th>封面</th>
                  <th>简介</th>
                  <th>排序</th>
                  <th>操作</th>
                </tr>
              </thead>
              <tbody>
                {volist name='list_topic' id='topic'}

                <tr class="item" data-id="{$topic.id}">
                  <td>{$topic.id}</td>
                  <td>{$topic.title}</td>
                  <td>
                    <img src="{$topic.title_img_src}" alt="">
                  </td>
                  
                  <td>{:\\app\\common\\TextFormat::br($topic.desc)}</td>
                  <td>{$topic.sort}</td>
                  <td>
                    <div>
                      <a href="{:url('edit',['id'=>$topic.id])}" class="layui-btn layui-btn-sm">编辑</a>
                      
                    </div>
                  </td>
                </tr>
                {/volist}
                {empty name='$list_topic'}
                <tr>
                  <td colspan="6">暂无数据</td>
                </tr>
                {/empty}
              </tbody>
            </table>

          </div>

        </div>

      </div>
    </div>
  </div>
  </div>
  {include file='common/_footer'/}

  <script>

    layui.use(['form', 'upload'], function () {

      $('.status-manage li').click(function () {
        var item = this;

        var data = $(item).data();

        location.href = data.href
      })

    })

  </script>
</body>

</html>